import { NgModule,SkipSelf,Optional } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CoreModule } from '../core/core.module';
import { RouterModule }   from '@angular/router';
import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';
import { FormsModule,ReactiveFormsModule  }   from '@angular/forms';
import { InternalComponent } from './internal.component';
import { InternalIndexingTaskComponent } from '../internal/internal-indexing-task/internal-indexing-task.component';
import { InternalIndexedTableComponent } from '../internal/internal-indexed-table/internal-indexed-table.component';
import { InternalIndexedModalTableVersionComponent } from '../internal/internal-indexed-modal-table-version/internal-indexed-modal-table-version.component';
import {
    MatAutocompleteModule,
    MatButtonModule,
    MatInputModule,
} from '@angular/material';
import {InternalAutocomplateComponent} from './internal-autocomplate/internal-autocomplate.component';
import { PublicModule } from '../public/public.module';
import {InternalIndexedModalTableComponent} from './internal-indexed-modal-table/internal-indexed-modal-table.component';
import {InternalIndexedDeleteComponent} from './internal-indexed-delete/internal-indexed-delete.component';
import {InternalIndexedModalAddVersionComponent} from './internal-indexed-modal-add-version/internal-indexed-modal-add-version.component';
import { AddKeywordComponent } from './internal-indexing-task/add-keyword/add-keyword.component';
import { ViewKeywordComponent } from './internal-indexing-task/view-keyword/view-keyword.component';
import { TreeModule } from 'primeng/primeng';
import { TreeTableModule } from '../public/treetable/treetable';
import {InternalIndexedModalRelthemeComponent} from './internal-indexed-modal-reltheme/internal-indexed-modal-reltheme.component';
import { ReferenceIndexingComponent } from './internal-indexing-task/reference-indexing/reference-indexing.component';
import { InternalIndexedDeleteComponents } from './internal-indexed-modal-reltheme/internal-indexed-modal-reltheme-delete/internal-indexed-delete.component';
import { AutomaticMatchingComponent } from './internal-indexing-task/automatic-matching/automatic-matching.component';
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
import {LeftKeywordComponent} from './internal-indexing-task/left-keyword/left-keyword.component';
import {InternalModalAutocomplateComponent} from './internal-modal-autocomplate/internal-modal-autocomplate.component';
import {InternalModalDateComponent} from './internal-modal-date/internal-modal-date.component';
import {IndexingPopoverComponent} from './internal-indexing-task/indexing-popover/indexing-popover.component';
import { TimeAttributeComponent } from './internal-indexing-task/time-attribute/time-attribute.component';
import { TimeAttributeEditComponent } from './internal-indexing-task/time-attribute/time-attribute-edit/time-attribute-edit.component';
import { TimeAttributeDeleteComponent } from './internal-indexing-task/time-attribute/time-attribute-delete/time-attribute-delete.component';
import { IndexingAttributeComponent } from './internal-indexing-task/indexing-attribute/indexing-attribute.component';
import { SidebarModule } from '../sidebar/sidebar.module';
import { IndexingAuditComponent } from './internal-indexing-task/indexing-audit/indexing-audit.component';
import { InternalIndexedAttrTimeDeleteComponent } from './internal-indexed-delete/internal-indexed-attr-time-delete.component';
@NgModule({
  imports: [
    BsDatepickerModule.forRoot(),
    CommonModule,
    CoreModule,
    RouterModule,
    FormsModule,
    ReactiveFormsModule,
    MatAutocompleteModule,
    MatButtonModule,
    MatInputModule,
    PublicModule,
    TreeModule,
    TreeTableModule,
    InfiniteScrollModule,
    SidebarModule
  ],
    declarations: [
        InternalComponent,
        InternalIndexingTaskComponent,
        InternalAutocomplateComponent,
        InternalIndexedModalTableComponent,
        InternalIndexedTableComponent,
        InternalIndexedDeleteComponent,
        InternalIndexedAttrTimeDeleteComponent,
        InternalIndexedModalAddVersionComponent,
        AddKeywordComponent,
        ViewKeywordComponent,
        InternalIndexedModalTableVersionComponent,
        InternalIndexedModalRelthemeComponent,
        ReferenceIndexingComponent,
        InternalIndexedDeleteComponents,
        AutomaticMatchingComponent,
        LeftKeywordComponent,
        InternalModalAutocomplateComponent,
        InternalModalDateComponent,
        IndexingPopoverComponent,
        TimeAttributeComponent,
        TimeAttributeEditComponent,
        TimeAttributeDeleteComponent,
        IndexingAttributeComponent,
        IndexingAuditComponent
    ]
})
export class InternalModule { 
  constructor(@Optional() @SkipSelf() parent:InternalModule){
    if(parent){
      throw new Error('Internal模块已经加载，不要再次加载')
    }
  }
}
